<?php
namespace Admin\Controller;
use Admin\Controller\CommonController;
// +----------------------------------------------------------------------
// | Date:2017年1月12日
// +----------------------------------------------------------------------
// | Author: EK_熊<1439527494@qq.com>
// +----------------------------------------------------------------------
// | Description: 此文件作用于****
// +----------------------------------------------------------------------
class CommentController extends CommonController{
    public function _initialize(){
        parent::_initialize();
        $this->model = M('Comment');
    }
    
    
    public function index(){
        $model = $this->model->alias('msg')->join('__PRODUCT__ pro ON pro.id = msg.pro_id');
        $field = 'msg.id as id,title,pro_id,msg.content,msg.created_time,uid,msg.status';
        $where['msg.status'] = ['egt',0];
        $list = $this->lists($model,$where,$order='msg.created_time desc',$field);
        
        $list = D('Home/Account','Service')->append_user_field($list,'ep_id,ep_name,dep_name');
        $this->assign('list',$list);
        $this->display();
    }
    
    
    
}
